import java.util.ArrayList;
import java.util.Scanner;

import MyException.TestsIndexOutOfBoundsException;
import Sorts.BubbleSort;
import Test.*;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Test[] tests = new Test[11];
        tests[0] = new TestBinaryTree(0);
        tests[1] = new TestMyArrayList(1);
        tests[2] = new TestMyLinkedList(2);
        tests[3] = new TestMyPriorityQueue(3);
        tests[4] = new TestQueue(4);
        tests[5] = new TestSorts(5);
        tests[6] = new TestStack(6);
        tests[7] = new TestAVLTree(7);
        tests[8] = new TestHashMap(8);
        tests[9] = new TestRBTree(9);
        tests[10] = new TestGraph(10);
        for(Test t : tests) {
            System.out.println(t);
        }
        System.out.print("请选择:>");
        int n = scanner.nextInt();
        if(n < 0 || n >= tests.length) {
            throw new TestsIndexOutOfBoundsException();
        }
        Test test = tests[n];
        test.test();
    }
}



